package com.z6pin.user.z6pinuser.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.z6pin.user.z6pinuser.domain.Person;
import com.z6pin.user.z6pinuser.service.PersonHystrixService;
import com.z6pin.user.z6pinuser.service.PersonService;

@RestController
public class UserController {

	@Autowired
	PersonHystrixService personHystrixService;
	
	@RequestMapping("/getUser")
	public String getUser(String uid) {
		
		return uid+"---"+uid;
	}
	
    @RequestMapping("/getDjgStart")
    public String getDjgStart(Long id,String name) {
    	 	Person person = new Person();
    	 	person.setId(id);
    	 	person.setName(name);
    		System.out.println("start-----------"+person.getName());
    		person = personHystrixService.getDjg(person);
    		System.out.println("end-----------"+person.getName());
        return ""+person.getName();
    }
    
}
